package com.zking.shiro.mapper;

import com.zking.shiro.model.Role;

public interface RoleMapper {


    int deleteByPrimaryKey(Long roleId);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long roleId);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);



    int delUserRole(Long roleId);//删除用户角色表

    int delRolePms(Role role);//删除角色权限表

    //权限关键接口
    int doGrantRoleToUser(Role role);//给用户分配角色


    int doRevokeRoleFromUser(Role role);//从用户收回角色


    int doGrantPermissionToRole(Role role);//给角色分配权限


    int doRevokePermissionFromRole(Role role);//从角色收回权限


}